#include<stdio.h>
int count(int a,int b)
{
	int m;
	m=a%b;
	if(m==0)
	return b;
	else return count(b,m);
}
int main()
{
	int n, m;
	scanf("%d/%d", &n, &m);
	int tmp = count(n, m);
	printf("%d/%d", n/tmp, m/tmp);
	return 0;
}
